package ldh.im.fxbase.rpc.service;

import ldh.im.dto.base.OkResp;
import ldh.im.dto.business.base.*;
import ldh.im.dto.business.group.GroupInfoListReq;
import ldh.im.dto.business.item.*;
import ldh.im.dto.business.message.*;
import ldh.im.dto.business.user.UserInfoListReq;
import ldh.rpc.Rpc;
import ldh.rpc.RpcMapper;
import ldh.rpc.exception.RpcException;

@Rpc
public interface RpcPullMessageService {

    // 拉取变更的配置信息
    @RpcMapper(path="pullConfigs")
    ConfigItemList pullConfigList(ConfigPullReq configPullReq) throws RpcException;

    // 拉取变更的组织架构信息
    @RpcMapper(path="pullDepartments")
    DepartmentInfoItemList pullDepartmentInfoList(DepartmentInfoListReq departmentInfoListReq) throws RpcException;

    // 拉取变更的聊天群信息
    @RpcMapper(path="pullGroups")
    GroupInfoItemList pullGroupInfoList(GroupInfoListReq groupInfoListReq) throws RpcException;

    // 拉取变更的用户信息
    @RpcMapper(path="pullUsers")
    UserInfoItemList pullUserInfoList(UserInfoListReq userInfoListReq) throws RpcException;

    // 拉取变更的模块信息
    @RpcMapper(path="pullModules")
    ModuleInfoItemList pullModuleInfoList(ModulePullReq modulePullReq) throws RpcException;

    // 拉取会话
    @RpcMapper(path="pullSessions")
    SessionItemList pullSessionList(SessionPullReq sessionPullReq) throws RpcException;

    // 拉取某个会话
    @RpcMapper(path="pullSession")
    SessionItem pullSession(SessionInfoReq sessionInfoReq) throws RpcException;

    // 拉取指定消息
    @RpcMapper(path="pullMessageByMessageIds")
    MessageObjectList pullMessageByMessageIds(MessagePullByMessageIdsReq messagePullByMessageIdsReq) throws RpcException;

    // 拉取消息群
    @RpcMapper(path="pullMessageByMessageId")
    MessageObjectList pullMessageByMessageId(MessagePullByUserOrGroupReq messagePullByUserOrGroupReq) throws RpcException;

    // 支持多线程拉取消息群
    @RpcMapper(path="pullMessageByMessageId2")
    MessageObjectList pullMessageByMessageId2(MessagePullByUserOrGroupReq messagePullByUserOrGroupReq) throws RpcException;

    // 批量拉取消息群
    @RpcMapper(path="pullMessageBySessionIds")
    MessageObjectList pullMessageBySessionIds(MessagePullBySessionIdsReq messagePullBySessionIdsReq) throws RpcException;

    // 批量拉取事件消息
    @RpcMapper(path="pullActionMessages")
    MessageActionList pullMessageActionList(MessagePullActionReq messagePullActionReq) throws RpcException;

    // 拉取事件消息进行确认
    @RpcMapper(path="okPullActionMessages", readTimeout = 120)
    OkResp okPullActionMessages(MessagePullActionOkReq messagePullActionOkReq) throws RpcException;
}
